import { init } from "snabbdom/build/package/init"
import { h } from "snabbdom/build/package/h"

import { styleModule } from "snabbdom/build/package/modules/style"
import { eventListenersModule } from "snabbdom/build/package/modules/eventlisteners";

console.log(styleModule, 'xxx222',eventListenersModule)
// 注册模块
let patch = init([
  styleModule,
  eventListenersModule
])

let vnode = h('div#context.cls',{
  value: '111',
  style: {
    color: 'red',
    height: '100px',
    width: '100px',
    backgroundColor: "yellow"
  },
  on: {
    click: (e) => {
      console.log(e,'xxx')
    }
  }
}, ['xxxxxx', h('div', 'spamxxxx')])
let oldVnode = document.getElementById('app')
patch(oldVnode,vnode)